<template>
    <div class="swiper">
        <el-carousel :interval="3000" type="card" height="280px">
            <el-carousel-item v-for="(item,index) in swiperList" :key="index">
                <img :src="item.pic" />
            </el-carousel-item>
        </el-carousel>
    </div>
</template>

<script>
import {swiperList} from "../assets/data/swiper";
export default {
  name: "Swiper",
  data() {
    return {
      swiperList: []
    }
  },
  created () {
    this.getSwiper();
  },

  methods:{
    getSwiper(){
      this.getRequest('/sou/carousel/').then(resp=>{
        this.swiperList = resp
      })
    }
  }

}
</script>

<style lang="scss" scoped>
    @import '../assets/css/swiper.scss';
    @import '../assets/css/index.scss';
</style>
